Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue in asset-packager with rails 3.0.5 due to the unsafe html string #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Rameshv
Copy link

@Rameshv Rameshv commented Aug 25, 2011

I am using asset-packager with rails 3.0.5 , had a strange problem. It started printing the js include statements as a text (unsafe html) instead of a html.

It turns out there is a problem in this line of asset_packager_helper.rb

sources.collect {|source| javascript_include_tag(source, options) }.join("\n")
#and 
sources.collect { |source| stylesheet_link_tag(source, options) }.join("\n")    

javascript_include_tag itself returns the safe html input, and by joining them we are producing the unsafe string. To avoid that we can directly call the javascript_include_tag with sources array

javascript_include_tag(sources, options)
#and
stylesheet_link_tag(sources, options)

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant